/*
 * @Author: your name
 * @Date: 2021-08-30 16:56:17
 * @LastEditTime: 2021-08-30 17:00:20
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \briup\5-javascript\day06\9-升序排列.js
 */

var arr = [8, 19, 3, 12, 5, 4];

function compare(v1, v2) {
    return v1 - v2;
}
arr.sort(compare);
console.log(arr);